/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author cegarciaa
 */
@Entity
@Table(name = "variableb")
@NamedQueries({
    @NamedQuery(name = "Variableb.findAll", query = "SELECT v FROM Variableb v"),
    @NamedQuery(name = "Variableb.findByIdvariableb", query = "SELECT v FROM Variableb v WHERE v.idvariableb = :idvariableb"),
    @NamedQuery(name = "Variableb.findByNombre", query = "SELECT v FROM Variableb v WHERE v.nombre = :nombre")})
public class Variableb implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IDVARIABLEB")
    private Long idvariableb;
    @Column(name = "NOMBRE")
    private String nombre;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "variableb")
    private List<Varbd> varbdList;

    public Variableb() {
    }

    public Variableb(Long idvariableb) {
        this.idvariableb = idvariableb;
    }

    public Long getIdvariableb() {
        return idvariableb;
    }

    public void setIdvariableb(Long idvariableb) {
        this.idvariableb = idvariableb;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public List<Varbd> getVarbdList() {
        return varbdList;
    }

    public void setVarbdList(List<Varbd> varbdList) {
        this.varbdList = varbdList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idvariableb != null ? idvariableb.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Variableb)) {
            return false;
        }
        Variableb other = (Variableb) object;
        if ((this.idvariableb == null && other.idvariableb != null) || (this.idvariableb != null && !this.idvariableb.equals(other.idvariableb))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Variableb[idvariableb=" + idvariableb + "]";
    }

}
